<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<c:set var="webroot" value="${pageContext.request.contextPath}" />
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="${webroot}/static/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="${webroot}/static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="${webroot}/static/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="${webroot}/static/js/messages_zh.js"></script>
<script type="text/javascript"
	src="${webroot}/static/js/app-common-2.00.0.js"></script>
<script type="text/javascript" src="${webroot}/static/js/layer/layer.js"></script>
<script src="${webroot}/static/js/jquery.form.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css"
	href="${webroot}/static/js/layer/skin/layer.css" />
<link rel="stylesheet" type="text/css"
	href="${webroot}/static/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css"
	href="${webroot}/static/css/bootstrap-table.min.css" />
<link rel="stylesheet" type="text/css"
	href="${webroot}/static/css/bootstrapValidator.css" />
<style type="text/css">
.control-group {
	width: 60%;
	margin-top: 30px;
}

label {
	width: 120px;
	text-align: right;
	display: table-cell;
	vertical-align: middle;
}

.control {
	display: table-cell;
	padding-left: 3px;
}

.control-input {
	width: 100px;
}

.control-button {
	float: right;
	padding-right: 120px;
	padding-top: 10px;
}

.control-button-input {
	float: right;
	position: relative;
	top: -34px;
	right: 25px;
	width: 85px;
	height: 30px;
}

.control-button-input1 {
	background-color: #9e9e9e1c;
	border-color: #9e9e9e45;
	width: 75px;
	height: 30px;
	border-radius: 8px;
}

.control-button-input2 {
	background-color: #03A9F4;
	border-color: #03A9F4;
	color: aliceblue;
	width: 100px;
	height: 31px;
	border-radius: 8px;
}
.ckeinput{
    width: 20px;
    height: 16px;
}
.layui-btn {
    display: inline-block;
    height: 38px;
    line-height: 38px;
    padding: 0 18px;
    background-color: #009688;
    color: #fff;
    white-space: nowrap;
    text-align: center;
    font-size: 14px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
}

.layui-btn-primary {
    border: 1px solid #C9C9C9;
    background-color: #fff;
    color: #555;
}
</style>
</head>
<body>
	<div>
		<form class="order-form" id="filterForm">
		  <input type="hidden" id="id" name="id" value="${integral.id}" />
			<div class="control-group">
				<label>手机号:</label>
				<div class="control">
					<input type="text" class="control-input" style="border:none; background-color: #ff000000;"  id="phone" name="phone" disabled="disabled" value="${integral.phone}"/>
				</div>
			</div>
			<div class="control-group">
				<label>昵称:</label>
				<div class="control">
					<input type="text" class="control-input" style="border:none; background-color: #ff000000;"  id="nickname" name="nickname" disabled="disabled" value="${integral.nickname}"/>
				</div>
			</div>
			<div class="control-group">
				<label>积分:</label>
				<div class="control">
					<input type="text" class="control-input"  id="integralNum" name="integralNum" value="${integral.integralNum}"/>
				</div>
			</div>
			<div style="padding-left: 75px; padding-top: 30px;">
				<input type="button" class="layui-btn" onclick="save();" value="确认" />
				<input type="button" class="layui-btn layui-btn-primary" onclick="cole();" value="取消" />
			</div>
		</form>
	</div>
</body>
<script type="text/javascript">
//确认
function save(){
	$.ajax({
		url : "${webroot}/userintegral/update",
		type : "POST",
		data : {
			"id" : $('#id').val(),
			"phone" : $('#phone').val(),
			"integralNum" : $('#integralNum').val()
		},
		dataType : "json",
		async : false,
		cache : false,
		success : function(obj) {
			if (obj != null) {
				layer.msg("操作成功");
				window.close();
				setTimeout(function(){window.parent.location.href = window.parent.location.href;},2000); 
			}else{
				layer.msg("操作失败");
			}
		}
	});
}

//取消
function cole(){
	app.layer.closeSelf();
}

</script>
</html>